--wip-- [skip ci]
This commit is contained in:
parent
ff279d92ad
commit
df9e409448
8 changed files with 276 additions and 196 deletions
96
flake.lock
generated
96
flake.lock
generated
|
|
@ -1,6 +1,42 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"deploy-rs": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"utils": "utils"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1668797197,
|
||||||
|
"narHash": "sha256-0w6iD3GSSQbIeSFVDzAAQZB+hDq670ZTms3d9XI+BtM=",
|
||||||
|
"owner": "serokell",
|
||||||
|
"repo": "deploy-rs",
|
||||||
|
"rev": "2a3c5f70eee04a465aa534d8bd4fcc9bb3c4a8ce",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "serokell",
|
||||||
|
"repo": "deploy-rs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1648199409,
|
||||||
|
"narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "64a525ee38886ab9028e6f61790de0832aa3ef03",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat_2": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1668681692,
|
"lastModified": 1668681692,
|
||||||
|
|
@ -79,7 +115,7 @@
|
||||||
"flake-utils"
|
"flake-utils"
|
||||||
],
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs-u"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
},
|
},
|
||||||
|
|
@ -114,16 +150,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1670355658,
|
"lastModified": 1648219316,
|
||||||
"narHash": "sha256-5q+lrQ11d1gJHYiYfaxvrlLu8sQw3TYbZJR9mKvOaI8=",
|
"narHash": "sha256-Ctij+dOi0ZZIfX5eMhgwugfvB+WZSrvVNAyAuANOsnQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b9279279bd5abe3cbd08fee1275de3036487d489",
|
"rev": "30d3d79b7d3607d56546dd2a6b49e156ba0ec634",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "release-22.11",
|
"ref": "nixpkgs-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
@ -160,6 +196,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1670355658,
|
||||||
|
"narHash": "sha256-5q+lrQ11d1gJHYiYfaxvrlLu8sQw3TYbZJR9mKvOaI8=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "b9279279bd5abe3cbd08fee1275de3036487d489",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "release-22.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"pre-commit-hooks": {
|
"pre-commit-hooks": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
|
|
@ -187,13 +239,13 @@
|
||||||
},
|
},
|
||||||
"pre-commit-hooks_2": {
|
"pre-commit-hooks_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat_2",
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
"flake-utils"
|
"flake-utils"
|
||||||
],
|
],
|
||||||
"gitignore": "gitignore",
|
"gitignore": "gitignore",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs-u"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
|
|
@ -213,36 +265,28 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"deploy-rs": "deploy-rs",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nix-rice": "nix-rice",
|
"nix-rice": "nix-rice",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-u": "nixpkgs-u",
|
"nixpkgs-u": "nixpkgs-u",
|
||||||
"pre-commit-hooks": "pre-commit-hooks_2",
|
"pre-commit-hooks": "pre-commit-hooks_2"
|
||||||
"tex2nix": "tex2nix"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tex2nix": {
|
"utils": {
|
||||||
"inputs": {
|
|
||||||
"flake-utils": [
|
|
||||||
"flake-utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs-u"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1665144382,
|
"lastModified": 1648297722,
|
||||||
"narHash": "sha256-CCnC3YsQCGoKIGdMND+pr5Rl7nufT1Krv1TZPBIEm8o=",
|
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
|
||||||
"owner": "Mic92",
|
"owner": "numtide",
|
||||||
"repo": "tex2nix",
|
"repo": "flake-utils",
|
||||||
"rev": "068e8655c754783d86f442f887f2e92305d9bd4a",
|
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "Mic92",
|
"owner": "numtide",
|
||||||
"repo": "tex2nix",
|
"repo": "flake-utils",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
323
flake.nix
323
flake.nix
|
|
@ -4,7 +4,6 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
|
||||||
nixpkgs-u.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs-u.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-22.05";
|
url = "github:nix-community/home-manager/release-22.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
@ -13,39 +12,28 @@
|
||||||
# url = "github:nix-community/home-manager";
|
# url = "github:nix-community/home-manager";
|
||||||
# inputs.nixpkgs.follows = "nixpkgs-u";
|
# inputs.nixpkgs.follows = "nixpkgs-u";
|
||||||
# };
|
# };
|
||||||
|
deploy-rs.url = "github:serokell/deploy-rs";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
# nixos-generators.url = "github:nix-community/nixos-generators";
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||||
|
nix-rice = { url = "github:bertof/nix-rice"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; };
|
||||||
nix-rice = {
|
pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; };
|
||||||
url = "github:bertof/nix-rice";
|
|
||||||
inputs = { nixpkgs.follows = "nixpkgs-u"; flake-utils.follows = "flake-utils"; };
|
|
||||||
};
|
|
||||||
pre-commit-hooks = {
|
|
||||||
url = "github:cachix/pre-commit-hooks.nix";
|
|
||||||
inputs = { nixpkgs.follows = "nixpkgs-u"; flake-utils.follows = "flake-utils"; };
|
|
||||||
};
|
|
||||||
tex2nix = {
|
|
||||||
url = "github:Mic92/tex2nix";
|
|
||||||
inputs = { nixpkgs.follows = "nixpkgs-u"; flake-utils.follows = "flake-utils"; };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ self
|
{ self
|
||||||
, nixpkgs
|
, nixpkgs
|
||||||
, home-manager
|
|
||||||
, nixpkgs-u
|
, nixpkgs-u
|
||||||
# , home-manager-u
|
, home-manager
|
||||||
|
, deploy-rs
|
||||||
, flake-utils
|
, flake-utils
|
||||||
|
# , nixos-generators
|
||||||
, nixos-hardware
|
, nixos-hardware
|
||||||
, tex2nix
|
|
||||||
, nix-rice
|
, nix-rice
|
||||||
, pre-commit-hooks
|
, pre-commit-hooks
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
config = {
|
||||||
defaultConfig = {
|
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
extraOptions = "experimental-features = nix-command flakes";
|
extraOptions = "experimental-features = nix-command flakes";
|
||||||
permittedInsecurePackages = [
|
permittedInsecurePackages = [
|
||||||
|
|
@ -54,19 +42,17 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
overlaysBuilder = { system }: [
|
overlays = [
|
||||||
# Packages
|
# Packages
|
||||||
(_: _: { stable = pkgs { inherit system; }; unstable = pkgs-u { inherit system; }; })
|
# (_: _: { stable = import nixpkgs { inherit config overlays; }; unstable = import nixpkgs-u { inherit config overlays; }; })
|
||||||
|
|
||||||
# Nix rice
|
# Nix rice
|
||||||
(nix-rice.overlays.default)
|
nix-rice.overlays.default
|
||||||
(import ./rice.nix)
|
(import ./rice.nix)
|
||||||
|
|
||||||
# Flakes packages
|
# Flakes packages
|
||||||
(final: _: {
|
(final: _: {
|
||||||
inherit (tex2nix.packages.${system}) tex2nix;
|
|
||||||
clipedit = final.callPackage ./custom/clipedit { };
|
clipedit = final.callPackage ./custom/clipedit { };
|
||||||
|
|
||||||
update-background = final.callPackage ./custom/update-background {
|
update-background = final.callPackage ./custom/update-background {
|
||||||
backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+";
|
backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+";
|
||||||
};
|
};
|
||||||
|
|
@ -80,160 +66,167 @@
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
modulesBuilder = { system, config ? defaultConfig }:
|
basic = with flake-utils.lib; eachDefaultSystem (system:
|
||||||
let overlays = overlaysBuilder { inherit system; }; in
|
let pkgs = import nixpkgs-u { inherit system config overlays; }; in
|
||||||
[
|
{
|
||||||
# Nix configuration
|
formatter = pkgs.nixpkgs-fmt;
|
||||||
({ pkgs, ... }: {
|
|
||||||
nixpkgs = { inherit system overlays config; };
|
checks = {
|
||||||
nix = {
|
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
||||||
package = pkgs.nixVersions.stable;
|
src = ./.;
|
||||||
extraOptions = "experimental-features = nix-command flakes";
|
hooks = { nixpkgs-fmt.enable = true; nix-linter.enable = true; };
|
||||||
};
|
};
|
||||||
})
|
};
|
||||||
|
|
||||||
# Home manager configuration
|
devShells.default = pkgs.mkShell {
|
||||||
home-manager.nixosModules.home-manager
|
buildInputs = with pkgs; [
|
||||||
({ home-manager = { useGlobalPkgs = true; useUserPackages = true; }; })
|
deploy-rs.packages.${system}.deploy-rs
|
||||||
|
];
|
||||||
|
shellHook = ''
|
||||||
|
${self.checks.${system}.pre-commit-check.shellHook}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
# Common modules
|
commonModules = [
|
||||||
./nixos_modules/bertof_user.nix
|
# Nix configuration
|
||||||
./nixos_modules/automatic-garbage-collection.nix
|
({ pkgs, ... }: {
|
||||||
./nixos_modules/automatic-upgrade.nix
|
nixpkgs = { inherit overlays config; };
|
||||||
./nixos_modules/zerotier.nix
|
nix = {
|
||||||
];
|
package = pkgs.nixVersions.stable;
|
||||||
|
extraOptions = "experimental-features = nix-command flakes";
|
||||||
|
# registry = {
|
||||||
|
# stable = {
|
||||||
|
# from = {
|
||||||
|
# # id = "stable";
|
||||||
|
# type = "indirect";
|
||||||
|
# };
|
||||||
|
# flake = nixpkgs;
|
||||||
|
# to = { owner = "nixos"; repo = "nixpkgs"; type = "github"; };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
pkgs = { system, config ? defaultConfig }:
|
# Home manager configuration
|
||||||
let overlays = overlaysBuilder { inherit system; }; in
|
home-manager.nixosModules.home-manager
|
||||||
import nixpkgs { inherit system config overlays; };
|
{ home-manager = { useGlobalPkgs = true; useUserPackages = true; }; }
|
||||||
pkgs-u = { system, config ? defaultConfig }:
|
|
||||||
let overlays = overlaysBuilder { inherit system; }; in
|
|
||||||
import nixpkgs-u { inherit system config overlays; };
|
|
||||||
|
|
||||||
odinBaseModules = [
|
./nixos_modules/bertof_user.nix
|
||||||
./odin/hardware-configuration.nix
|
./nixos_modules/automatic-garbage-collection.nix
|
||||||
nixos-hardware.nixosModules.common-cpu-intel
|
./nixos_modules/automatic-upgrade.nix
|
||||||
nixos-hardware.nixosModules.common-pc-laptop
|
./nixos_modules/zerotier.nix
|
||||||
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
|
||||||
./odin/common_configuration.nix
|
|
||||||
|
|
||||||
./nixos_modules/pro_audio.nix
|
|
||||||
./nixos_modules/sesar.nix
|
|
||||||
];
|
];
|
||||||
odinIntelModules = [ ./odin/configuration-intel.nix ];
|
|
||||||
odinNvidiaModules = [ ./odin/configuration-nvidia.nix ];
|
|
||||||
|
|
||||||
odinIntelBuilder = { extraModules ? [ ] }:
|
thorConfig = {
|
||||||
nixpkgs.lib.nixosSystem rec {
|
nixosConfigurations = {
|
||||||
system = "x86_64-linux";
|
thor = nixpkgs.lib.nixosSystem rec {
|
||||||
modules = (modulesBuilder { inherit system; })
|
system = "x86_64-linux";
|
||||||
++ odinBaseModules ++ odinIntelModules
|
modules = commonModules ++ [
|
||||||
++ [{ home-manager.users.bertof = import ./odin/hm.nix; }]
|
{ nixpkgs.config = config // { cudaSupport = true; }; }
|
||||||
++ extraModules;
|
./thor/hardware-configuration.nix
|
||||||
};
|
nixos-hardware.nixosModules.common-cpu-amd
|
||||||
odinNvidiaBuilder = { extraModules ? [ ] }:
|
nixos-hardware.nixosModules.common-pc-ssd
|
||||||
nixpkgs.lib.nixosSystem rec {
|
./thor/configuration.nix
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = (modulesBuilder { inherit system; config = defaultConfig // { cudaSupport = true; }; })
|
|
||||||
++ odinBaseModules ++ odinNvidiaModules
|
|
||||||
++ [{ home-manager.users.bertof = import ./odin/hm.nix; }]
|
|
||||||
++ extraModules;
|
|
||||||
};
|
|
||||||
|
|
||||||
thorBaseModules = [
|
./nixos_modules/pro_audio.nix
|
||||||
./thor/hardware-configuration.nix
|
./nixos_modules/sesar.nix
|
||||||
nixos-hardware.nixosModules.common-cpu-amd
|
./nixos_modules/pentablet.nix
|
||||||
nixos-hardware.nixosModules.common-pc-ssd
|
|
||||||
./thor/configuration.nix
|
|
||||||
|
|
||||||
./nixos_modules/pro_audio.nix
|
{ home-manager.users.bertof = import ./thor/hm.nix; }
|
||||||
./nixos_modules/sesar.nix
|
];
|
||||||
./nixos_modules/pentablet.nix
|
|
||||||
];
|
|
||||||
thorBuilder = { extraModules ? [ ] }:
|
|
||||||
nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = (modulesBuilder { inherit system; config = defaultConfig // { cudaSupport = true; }; })
|
|
||||||
++ thorBaseModules
|
|
||||||
++ [{ home-manager.users.bertof = import ./thor/hm.nix; }]
|
|
||||||
++ extraModules;
|
|
||||||
};
|
|
||||||
|
|
||||||
lokiBaseModules = [
|
|
||||||
./loki/hardware-configuration.nix
|
|
||||||
nixos-hardware.nixosModules.common-cpu-intel
|
|
||||||
nixos-hardware.nixosModules.common-pc-ssd
|
|
||||||
./loki/configuration.nix
|
|
||||||
];
|
|
||||||
lokiBuilder = { extraModules ? [ ] }:
|
|
||||||
nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = (modulesBuilder { inherit system; })
|
|
||||||
++ lokiBaseModules
|
|
||||||
++ [{ home-manager.users.bertof = import ./loki/hm.nix; }]
|
|
||||||
++ extraModules;
|
|
||||||
};
|
|
||||||
|
|
||||||
freyaBaseModules = [
|
|
||||||
# ./freya/hardware-configuration.nix
|
|
||||||
nixos-hardware.nixosModules.raspberry-pi."4"
|
|
||||||
./freya/configuration.nix
|
|
||||||
];
|
|
||||||
freyaBuilder = { extraModules ? [ ] }:
|
|
||||||
nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = (modulesBuilder { inherit system; })
|
|
||||||
++ freyaBaseModules
|
|
||||||
++ [{ home-manager.users.bertof = import ./freya/hm.nix; }]
|
|
||||||
++ extraModules;
|
|
||||||
};
|
|
||||||
|
|
||||||
baldurBaseModules = [ ./baldur/configuration.nix ];
|
|
||||||
balurBuilder = { extraModules ? [ ] }:
|
|
||||||
nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = (modulesBuilder { inherit system; })
|
|
||||||
++ baldurBaseModules
|
|
||||||
++ [{ home-manager.users.bertof = import ./baldur/hm.nix; }]
|
|
||||||
++ extraModules;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
(flake-utils.lib.eachDefaultSystem (system: rec {
|
|
||||||
packages = pkgs-u { inherit system; };
|
|
||||||
|
|
||||||
formatter = (pkgs-u { inherit system; }).nixpkgs-fmt;
|
|
||||||
|
|
||||||
checks = {
|
|
||||||
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
|
||||||
src = ./.;
|
|
||||||
hooks = {
|
|
||||||
nixpkgs-fmt.enable = true;
|
|
||||||
nix-linter.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.default = packages.mkShell {
|
odinConfig = {
|
||||||
shellHook = ''
|
nixosConfigurations =
|
||||||
${self.checks.${system}.pre-commit-check.shellHook}
|
let
|
||||||
'';
|
odinCommonModules = [
|
||||||
|
nixos-hardware.nixosModules.common-cpu-intel
|
||||||
|
nixos-hardware.nixosModules.common-pc-laptop
|
||||||
|
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||||
|
./odin/hardware-configuration.nix
|
||||||
|
./odin/common_configuration.nix
|
||||||
|
|
||||||
|
./nixos_modules/pro_audio.nix
|
||||||
|
./nixos_modules/sesar.nix
|
||||||
|
./nixos_modules/pentablet.nix
|
||||||
|
|
||||||
|
{ home-manager.users.bertof = import ./odin/hm.nix; }
|
||||||
|
];
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
odin-nvidia = nixpkgs.lib.nixosSystem rec {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = commonModules ++ odinCommonModules ++ [
|
||||||
|
{ nixpkgs.config = config // { cudaSupport = true; }; }
|
||||||
|
./odin/configuration-nvidia.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
odin-intel = nixpkgs.lib.nixosSystem rec {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = commonModules ++ odinCommonModules ++ [
|
||||||
|
./odin/configuration-intel.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
odin = odin-intel;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
})) // {
|
|
||||||
nixosConfigurations = rec {
|
|
||||||
|
|
||||||
thor = thorBuilder { };
|
freyaConfig = {
|
||||||
|
nixosConfigurations = rec {
|
||||||
odin = odin-intel;
|
freya = nixpkgs.lib.nixosSystem rec {
|
||||||
odin-intel = odinIntelBuilder { };
|
system = "aarch64-linux";
|
||||||
odin-nvidia = odinNvidiaBuilder { };
|
modules = commonModules ++ [
|
||||||
|
nixos-hardware.nixosModules.raspberry-pi."4"
|
||||||
loki = lokiBuilder { };
|
./freya/hardware-configuration.nix
|
||||||
# loki-stable = lokiStable [ ./nixos_modules/dnsmasq.nix ];
|
./freya/configuration.nix
|
||||||
# loki-k3s = lokiStable [ ./nixos_modules/k3s.nix ];
|
{ home-manager.users.bertof = import ./freya/hm.nix; }
|
||||||
# loki-unstable = lokiUnstable [ ];
|
];
|
||||||
|
};
|
||||||
freya = freyaBuilder { };
|
};
|
||||||
baldur = balurBuilder { };
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
baldurConfig = {
|
||||||
|
nixosConfigurations = rec {
|
||||||
|
baldur = nixpkgs.lib.nixosSystem rec {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = commonModules ++ [
|
||||||
|
# nixos-hardware.nixosModules.common-cpu-amd
|
||||||
|
# nixos-hardware.nixosModules.common-pc-ssd
|
||||||
|
./baldur/hardware-configuration.nix
|
||||||
|
./baldur/configuration.nix
|
||||||
|
{ home-manager.users.bertof = import ./baldur/hm.nix; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
lokiConfig = {
|
||||||
|
nixosConfigurations = rec {
|
||||||
|
loki = nixpkgs.lib.nixosSystem rec {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = commonModules ++ [
|
||||||
|
nixos-hardware.nixosModules.common-cpu-intel
|
||||||
|
nixos-hardware.nixosModules.common-pc-ssd
|
||||||
|
./loki/hardware-configuration.nix
|
||||||
|
./loki/configuration.nix
|
||||||
|
{ home-manager.users.bertof = import ./loki/hm.nix; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
builtins.foldl' nixpkgs.lib.recursiveUpdate { } [
|
||||||
|
basic
|
||||||
|
thorConfig
|
||||||
|
odinConfig
|
||||||
|
freyaConfig
|
||||||
|
baldurConfig
|
||||||
|
lokiConfig
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
];
|
];
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.unstable.helix;
|
# package = pkgs.helix;
|
||||||
languages = [ ];
|
languages = [ ];
|
||||||
settings = {
|
settings = {
|
||||||
theme = "ayu_mirage";
|
theme = "ayu_mirage";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
bibtool
|
bibtool
|
||||||
tex2nix
|
# tex2nix
|
||||||
texlab
|
texlab
|
||||||
texlive.combined.scheme-medium
|
texlive.combined.scheme-medium
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home.packages = with pkgs.unstable; [
|
home.packages = with pkgs; [
|
||||||
libreoffice-fresh
|
libreoffice-fresh
|
||||||
# onlyoffice-bin
|
# onlyoffice-bin
|
||||||
hunspellDicts.en_GB-large
|
hunspellDicts.en_GB-large
|
||||||
|
|
|
||||||
43
nixos_modules/nix-serve.nix
Normal file
43
nixos_modules/nix-serve.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
user_keys = user: lib.optionals
|
||||||
|
(builtins.hasAttr "bertof" config.users.users)
|
||||||
|
config.users.users.${user}.openssh.authorizedKeys.keys;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# nix.buildMachines
|
||||||
|
nix.distributedBuilds = true;
|
||||||
|
|
||||||
|
nix.sshServe = {
|
||||||
|
enable = true;
|
||||||
|
keys = user_keys "bertof";
|
||||||
|
write = true;
|
||||||
|
protocol = "ssh-ng";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nix-serve = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
secretKeyFile = "/etc/nix/serve";
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.settings = {
|
||||||
|
trusted-users = [ "root" "nix-ssh" "@wheel" ];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"odin:ukZZy//P0nBAcy4ycX8eYCByRJFOfJRlfW4sYjP/rGE="
|
||||||
|
"loki:jVAH1bQugXdQ1w29lvVknyPqWwmAn7WhjKf7z4t+q7E="
|
||||||
|
];
|
||||||
|
substituters = [
|
||||||
|
# "https://192.168.0.10"
|
||||||
|
# "https://192.168.0.100"
|
||||||
|
# "ssh-ng://loki.local"
|
||||||
|
# "ssh-ng://odin.local"
|
||||||
|
# "ssh-ng://192.168.0.10"
|
||||||
|
# "ssh-ng://192.168.0.100"
|
||||||
|
];
|
||||||
|
# trusted-substituters = [
|
||||||
|
# ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
teams
|
teams
|
||||||
thunderbird
|
thunderbird
|
||||||
transmission-gtk
|
transmission-gtk
|
||||||
unstable.firefox
|
firefox
|
||||||
virt-manager
|
virt-manager
|
||||||
virt-viewer
|
virt-viewer
|
||||||
# wineFull
|
# wineFull
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
teams
|
teams
|
||||||
thunderbird
|
thunderbird
|
||||||
transmission-gtk
|
transmission-gtk
|
||||||
unstable.firefox
|
firefox
|
||||||
virt-manager
|
virt-manager
|
||||||
virt-viewer
|
virt-viewer
|
||||||
# wineFull
|
# wineFull
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue