homeDirectory conflicting values

main
Carsten Kragelund 2023-06-16 06:42:12 +02:00
parent fc7f47c56c
commit 6c3072debb
16 changed files with 210 additions and 144 deletions

@ -129,20 +129,19 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ]
"utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1681092193, "lastModified": 1686693375,
"narHash": "sha256-JerCqqOqbT2tBnXQW4EqwFl0hHnuZp21rIQ6lu/N4rI=", "narHash": "sha256-1Smjo0E8WI9PeVGmmCjpQWRX04aQvz5gAGXfdanIjgw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "f9edbedaf015013eb35f8caacbe0c9666bbc16af", "rev": "61e5d1c38ef04ba30a9119825b159bce9c6010be",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-22.11", "ref": "release-23.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -167,6 +166,26 @@
"type": "github" "type": "github"
} }
}, },
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1686307493,
"narHash": "sha256-R4VEFnDn7nRmNxAu1LwNbjns5DPM8IBsvnrWmZ8ymPs=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "7c16d31383a90e0e72ace0c35d2d66a18f90fb4f",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixos-wsl": { "nixos-wsl": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
@ -191,16 +210,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1683478192, "lastModified": 1686846322,
"narHash": "sha256-7f7RR71w0jRABDgBwjq3vE1yY3nrVJyXk8hDzu5kl1E=", "narHash": "sha256-FtBG6hLN9Ui41F+S0Mjveo/FarUawLBAYQ1EBBNmiTo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c568239bcc990050b7aedadb7387832440ad8fb1", "rev": "083cb1a04d196e35b9c8293a379266c854e284c1",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",
"ref": "nixos-22.11", "ref": "release-23.05",
"type": "indirect" "type": "indirect"
} }
}, },
@ -241,6 +260,7 @@
"emacs-overlay": "emacs-overlay", "emacs-overlay": "emacs-overlay",
"home-manager": "home-manager", "home-manager": "home-manager",
"nekowinston-nur": "nekowinston-nur", "nekowinston-nur": "nekowinston-nur",
"nix-darwin": "nix-darwin",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
@ -281,17 +301,17 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1684541278, "lastModified": 1686890354,
"narHash": "sha256-Uj3zSVFV690qMTtXvTK98JaL+lliUrP5bZ++to2naE8=", "narHash": "sha256-a8Yxu4ApSk6fhfRoHvnWhUJuOG/A7BVASczKtdXMzf0=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "df04918245d3a0e630374d9eca162b844c18da5d", "rev": "72e258ac341e9e91314a2738b7577273354a386b",
"revCount": 23, "revCount": 24,
"type": "git", "type": "git",
"url": "https://gitea.pid1.sh/sanctureplicum/nur.git" "url": "file:///Users/carsten/source/nur"
}, },
"original": { "original": {
"type": "git", "type": "git",
"url": "https://gitea.pid1.sh/sanctureplicum/nur.git" "url": "file:///Users/carsten/source/nur"
} }
}, },
"sops-nix": { "sops-nix": {
@ -331,21 +351,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

@ -1,10 +1,10 @@
{ {
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-22.11"; nixpkgs.url = "nixpkgs/release-23.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/nur"; nur.url = "github:nix-community/nur";
sanctureplicum-nur = { sanctureplicum-nur = {
url = "git+https://gitea.pid1.sh/sanctureplicum/nur.git"; url = "git+file:///Users/carsten/source/nur";
inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs-unstable";
}; };
nekowinston-nur = { nekowinston-nur = {
@ -12,7 +12,7 @@
inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs-unstable";
}; };
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-22.11"; url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
sops-nix = { sops-nix = {
@ -26,6 +26,10 @@
url = "github:nix-community/nixos-wsl"; url = "github:nix-community/nixos-wsl";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-darwin = {
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
crane = { crane = {
url = "github:ipetkov/crane/v0.11.3"; url = "github:ipetkov/crane/v0.11.3";
inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs-unstable";
@ -45,6 +49,7 @@
nekowinston-nur, nekowinston-nur,
emacs-overlay, emacs-overlay,
nixos-wsl, nixos-wsl,
nix-darwin,
sops-nix, sops-nix,
crane, crane,
home-manager, home-manager,
@ -91,6 +96,7 @@
home-manager.backupFileExtension = "bak"; home-manager.backupFileExtension = "bak";
} }
./hosts/falcon ./hosts/falcon
./hosts/common/linux.nix
]; ];
}; };
nixosConfigurations.eagle = nixpkgs.lib.nixosSystem { nixosConfigurations.eagle = nixpkgs.lib.nixosSystem {
@ -114,8 +120,34 @@
]; ];
} }
./hosts/eagle ./hosts/eagle
./hosts/common/linux.nix
];
};
darwinConfigurations.hawk = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
({
config,
pkgs,
...
}: {
nixpkgs.overlays = overlays;
})
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "bak";
home-manager.sharedModules = [
sops-nix.homeManagerModule
];
}
./hosts/hawk
./hosts/common/darwin.nix
]; ];
}; };
nixosConfigurations.buzzard = nixpkgs.lib.nixosSystem { nixosConfigurations.buzzard = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
@ -138,6 +170,7 @@
]; ];
} }
./hosts/buzzard ./hosts/buzzard
./hosts/common/linux.nix
]; ];
}; };
nixosConfigurations.gitea = nixpkgs.lib.nixosSystem { nixosConfigurations.gitea = nixpkgs.lib.nixosSystem {
@ -154,6 +187,7 @@
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
./hosts/gitea ./hosts/gitea
./hosts/common/linux.nix
]; ];
}; };
}; };

@ -0,0 +1,5 @@
{ config, lib, ... }: {
security.pam.enableSudoTouchIdAuth = true;
services.nix-daemon.enable = true;
}

@ -8,24 +8,9 @@ with config;
with lib; with lib;
with pkgs; { with pkgs; {
imports = [ imports = [
./graphical.nix
./vm-guest.nix
./wsl.nix
./pkgs.nix ./pkgs.nix
]; ];
users = {
defaultUserShell = bash;
mutableUsers = true;
users.root = {
home = "/root";
uid = ids.uids.root;
group = "root";
initialHashedPassword = mkDefault "!";
};
};
# Enable non-free packages # Enable non-free packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -61,38 +46,4 @@ with pkgs; {
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Copenhagen"; time.timeZone = "Europe/Copenhagen";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.utf8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
};
# Configure console keymap
console.keyMap = "us";
security.pam.loginLimits = [
# Unlimited amount of processes for root
{
domain = "root";
item = "nproc";
value = "unlimited";
}
# Unlimited open file descriptors
{
domain = "*";
item = "nofile";
value = "unlimited";
}
];
networking = {
networkmanager.enable = true;
};
} }

@ -0,0 +1,65 @@
{ config, lib, ... }: {
imports = [
./graphical.nix
./vm-guest.nix
];
users = {
defaultUserShell = bash;
mutableUsers = true;
users.root = {
home = "/root";
uid = ids.uids.root;
group = "root";
initialHashedPassword = mkDefault "!";
};
};
# Configure console keymap
console.keyMap = "us";
boot = lib.mkIf (!config.wsl.enable or false) {
networking.nameservers = [ "192.168.1.1" "87.62.97.64" ];
loader = {
systemd-boot = {
enable = true;
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
};
};
# Select internationalisation properties.
i18n.defaultLocale = "en_US.utf8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
};
security.pam.loginLimits = [
# Unlimited amount of processes for root
{
domain = "root";
item = "nproc";
value = "unlimited";
}
# Unlimited open file descriptors
{
domain = "*";
item = "nofile";
value = "unlimited";
}
];
networking = {
networkmanager.enable = true;
};
}

@ -1,20 +0,0 @@
{ config
, lib
, pkgs
, ...
}: {
config = lib.mkIf (!config.wsl.enable or false) {
boot.loader = {
systemd-boot = {
enable = true;
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
};
networking.nameservers = [ "192.168.1.1" "87.62.97.64" ];
};
}

@ -0,0 +1,21 @@
{ config
, modulesPath
, pkgs
, ...
}: {
imports = [
../../users/carsten
../common
];
nix.settings.build-cores = 8;
networking.hostName = "hawk";
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = 4; # Did you read the comment?
}

@ -1,25 +1,25 @@
{ pkgs, ...}: { { pkgs, ...}: {
programs.firefox = { programs.firefox = {
extensions = with pkgs.nur.repos.rycee.firefox-addons; with pkgs.nur.repos.sanctureplicum.firefox-addons; [
add-custom-search-engine
clearurls
decentraleyes
duplicate-tab-shortcut
multi-account-containers
istilldontcareaboutcookies
masterpassword-firefox
header-editor
privacy-badger
privacy-redirect
amp2html
tab-stash
ublock-origin
vimium
];
profiles.default = {}; profiles.default = {};
profiles.dev-edition-default = { profiles.dev-edition-default = {
name = "dev-edition-default"; name = "dev-edition-default";
id = 1; id = 1;
extensions = with pkgs.nur.repos.rycee.firefox-addons; with pkgs.nur.repos.sanctureplicum.firefox-addons; [
add-custom-search-engine
clearurls
decentraleyes
duplicate-tab-shortcut
multi-account-containers
istilldontcareaboutcookies
masterpassword-firefox
header-editor
privacy-badger
privacy-redirect
amp2html
tab-stash
ublock-origin
vimium
];
settings = { settings = {
"app.normandy.api_url" = ""; "app.normandy.api_url" = "";
"app.normandy.enabled" = false; "app.normandy.enabled" = false;
@ -136,4 +136,4 @@
}; };
}; };
}; };
} }

@ -2,7 +2,7 @@
, osConfig , osConfig
, lib , lib
, ... }: { , ... }: {
config = lib.mkIf osConfig.graphical { config = lib.mkIf (osConfig.graphical or false) {
xdg.dataFile.backgrounds.source = ../wallpapers; xdg.dataFile.backgrounds.source = ../wallpapers;
dconf.settings = { dconf.settings = {

@ -9,4 +9,4 @@
enableBashIntegration = true; enableBashIntegration = true;
sshKeys = [ "64AB8617FA4EC63E93A4E1A94AE9B14AF64A86C6" "C54678A60A531F2144EC2391CF888696261ED167" ]; sshKeys = [ "64AB8617FA4EC63E93A4E1A94AE9B14AF64A86C6" "C54678A60A531F2144EC2391CF888696261ED167" ];
}; };
} }

@ -2,7 +2,7 @@
{ {
services.mpd = { services.mpd = {
enable = true; enable = false;
network.startWhenNeeded = true; network.startWhenNeeded = true;
}; };
} }

@ -11,7 +11,7 @@
userDirs = { userDirs = {
enable = true; enable = pkgs.stdenv.isLinux;
createDirectories = true; createDirectories = true;
# Improve the XDG dir locations so they dont clutter up $HOME # Improve the XDG dir locations so they dont clutter up $HOME

@ -1,34 +1,38 @@
{ {
config, config,
pkgs, pkgs,
lib,
... ...
}: { }: {
imports = []; imports = [];
users.users.carsten = { users.users.carsten = {
home = if pkgs.stdenv.isDarwin then "/Users/carsten" else "/home/carsten";
} // lib.mkIf pkgs.stdenv.isLinux {
isNormalUser = true; isNormalUser = true;
description = "Carsten Kragelund"; description = "Carsten Kragelund";
hashedPassword = "$y$j9T$oL/jNqI1yz65OuUnJvpCn1$MC7.xSyvprru7QmqQVsGyBKZf2b4w7R7U.TmfzSBY39"; hashedPassword = "$y$j9T$oL/jNqI1yz65OuUnJvpCn1$MC7.xSyvprru7QmqQVsGyBKZf2b4w7R7U.TmfzSBY39";
shell = pkgs.bash;
packages = [];
extraGroups = [ extraGroups = [
"networkmanager" # Use networks "networkmanager" # Use networks
"wheel" # Sudoer "wheel" # Sudoer
"vboxusers" # VirtualBox "vboxusers" # VirtualBox
"docker" # Containers "docker" # Containers
]; ];
shell = pkgs.bash;
packages = [];
}; };
home-manager.users.carsten = { home-manager.users.carsten = {
imports = [ imports = [
./config.nix ./config.nix
]; ];
home = { home = {
inherit (config.system) stateVersion; stateVersion = "23.05";
homeDirectory = if pkgs.stdenv.isDarwin then "/Users/carsten" else "/home/carsten";
username = "carsten"; username = "carsten";
homeDirectory = "/home/carsten";
}; };
}; };
} }

@ -11,9 +11,9 @@
./editors.nix ./editors.nix
]; ];
programs.bash.enable = builtins.trace config.home.profileDirectory true; programs.bash.enable = true;
services.lorri.enable = true; services.lorri.enable = pkgs.stdenv.isLinux;
home.packages = with pkgs; home.packages = with pkgs;
[ [
@ -26,7 +26,7 @@
jq jq
mcfly mcfly
( (
if osConfig.graphical if (osConfig.graphical or true)
then pinentry-gtk2 then pinentry-gtk2
else pinentry-curses else pinentry-curses
) )
@ -51,20 +51,21 @@
# language-servers # language-servers
rust-analyzer rust-analyzer
] ]
++ lib.lists.optionals osConfig.graphical [ ++ lib.lists.optionals (osConfig.graphical or true) [
(discord.override {withOpenASAR = true;}) (discord.override {withOpenASAR = true;})
catppuccin-gtk
dconf
gparted
numberstation
pavucontrol
recursive recursive
wireplumber
# Local # Local
(callPackage ./areon-pro {}) (callPackage ./areon-pro {})
pkgs.nur.repos.sanctureplicum.rec-mono-nyx pkgs.nur.repos.sanctureplicum.rec-mono-nyx
] ++ lib.lists.optionals (osConfig.graphical or true && pkgs.stdenv.isLinux) [
catppuccin-gtk
pavucontrol
dconf
gparted
numberstation
wireplumber
gnomeExtensions.color-picker gnomeExtensions.color-picker
gnomeExtensions.just-perfection gnomeExtensions.just-perfection
gnomeExtensions.unite gnomeExtensions.unite

@ -1,6 +1,6 @@
{ osConfig, pkgs, ... }: { { osConfig, pkgs, ... }: {
programs.firefox = { programs.firefox = {
enable = osConfig.graphical; enable = osConfig.graphical or true;
package = (pkgs.firefox-devedition-bin.override { wmClass = "firefox-aurora"; }); package = if pkgs.stdenv.isLinux then (pkgs.firefox-devedition.override { wmClass = "firefox-aurora"; }) else (pkgs.writeScriptBin "__dummy-firefox" "");
}; };
} }

@ -1,4 +1,4 @@
{ ... }: { { pkgs, ... }: {
programs.gpg.enable = true; programs.gpg.enable = true;
services.gpg-agent.enable = true; services.gpg-agent.enable = pkgs.stdenv.isLinux;
} }