Reformat + swap odin SSD
This commit is contained in:
parent
1bc27dde82
commit
2f3d05a802
83 changed files with 1448 additions and 931 deletions
170
flake.nix
170
flake.nix
|
|
@ -3,17 +3,41 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/release-22.05";
|
||||
home-manager = { url = "github:nix-community/home-manager/release-22.05"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-22.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixpkgs-u.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
home-manager-u = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs-u"; };
|
||||
home-manager-u = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs-u";
|
||||
};
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
|
||||
nix-rice = { url = "github:bertof/nix-rice"; inputs = { inxpkgs.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"; }; };
|
||||
nix-rice = {
|
||||
url = "github:bertof/nix-rice";
|
||||
inputs = {
|
||||
inxpkgs.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 =
|
||||
|
|
@ -30,13 +54,25 @@
|
|||
}:
|
||||
let
|
||||
overlaysBuilder = system: [
|
||||
(_: _: { inherit (tex2nix.packages.${system}) tex2nix; stable = pkgs { inherit system; }; unstable = pkgs-u { inherit system; }; })
|
||||
(_: _: {
|
||||
inherit (tex2nix.packages.${system}) tex2nix;
|
||||
stable = pkgs { inherit system; };
|
||||
unstable = pkgs-u { inherit system; };
|
||||
})
|
||||
(nix-rice.overlays.default)
|
||||
(import ./rice.nix)
|
||||
(final: _: {
|
||||
update-background = final.callPackage ./custom/update-background { backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+"; };
|
||||
lockscreen = final.callPackage ./custom/lockscreen { palette = final.rice.colorPalette; font = final.rice.font.normal; };
|
||||
sddm-theme-clairvoyance = final.callPackage ./custom/sddm-theme-clairvoyance { wallpaper = ./wallpapers/comfy_waves.jpg; };
|
||||
update-background = final.callPackage ./custom/update-background {
|
||||
backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+";
|
||||
};
|
||||
lockscreen = final.callPackage ./custom/lockscreen {
|
||||
palette = final.rice.colorPalette;
|
||||
font = final.rice.font.normal;
|
||||
};
|
||||
sddm-theme-clairvoyance =
|
||||
final.callPackage ./custom/sddm-theme-clairvoyance {
|
||||
wallpaper = ./wallpapers/comfy_waves.jpg;
|
||||
};
|
||||
})
|
||||
];
|
||||
defaultConfig = {
|
||||
|
|
@ -44,10 +80,18 @@
|
|||
allowUnfree = true;
|
||||
permittedInsecurePackages = [ "electron-9.4.4" ]; # authy dependency
|
||||
};
|
||||
nixpkgsSettings = { system, overlays ? overlaysBuilder system, config ? defaultConfig }: { inherit system overlays config; };
|
||||
nixpkgsSettings =
|
||||
{ system, overlays ? overlaysBuilder system, config ? defaultConfig }: {
|
||||
inherit system overlays config;
|
||||
};
|
||||
pkgs = s: import nixpkgs (nixpkgsSettings s);
|
||||
pkgs-u = s: import nixpkgs-u (nixpkgsSettings s);
|
||||
homeManagerSettings = { home-manager = { useGlobalPkgs = true; useUserPackages = true; }; };
|
||||
homeManagerSettings = {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
};
|
||||
};
|
||||
|
||||
commonBaseModules = [
|
||||
./nixos_modules/bertof_user.nix
|
||||
|
|
@ -79,22 +123,22 @@
|
|||
odinIntelModules = [ ./odin/configuration-intel.nix ];
|
||||
odinNvidiaModules = [ ./odin/configuration-nvidia.nix ];
|
||||
|
||||
odinIntelBuilder = { extraModules ? [ ] }: nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules =
|
||||
[{ nixpkgs = nixpkgsSettings { inherit system; }; }] ++
|
||||
commonBaseModules ++ odinBaseModules ++ odinIntelModules ++
|
||||
(homeManagerModules { bertof = import ./odin/hm.nix; }) ++
|
||||
extraModules;
|
||||
};
|
||||
odinNvidiaBuilder = { extraModules ? [ ] }: nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules =
|
||||
[{ nixpkgs = nixpkgsSettings { inherit system; }; }] ++
|
||||
commonBaseModules ++ odinBaseModules ++ odinNvidiaModules ++
|
||||
(homeManagerModules { bertof = import ./odin/hm.nix; }) ++
|
||||
extraModules;
|
||||
};
|
||||
odinIntelBuilder = { extraModules ? [ ] }:
|
||||
nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
|
||||
++ commonBaseModules ++ odinBaseModules ++ odinIntelModules
|
||||
++ (homeManagerModules { bertof = import ./odin/hm.nix; })
|
||||
++ extraModules;
|
||||
};
|
||||
odinNvidiaBuilder = { extraModules ? [ ] }:
|
||||
nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
|
||||
++ commonBaseModules ++ odinBaseModules ++ odinNvidiaModules
|
||||
++ (homeManagerModules { bertof = import ./odin/hm.nix; })
|
||||
++ extraModules;
|
||||
};
|
||||
|
||||
thorBaseModules = [
|
||||
./thor/hardware-configuration.nix
|
||||
|
|
@ -102,14 +146,14 @@
|
|||
nixos-hardware.nixosModules.common-pc-ssd
|
||||
./thor/configuration.nix
|
||||
];
|
||||
thorBuilder = { extraModules ? [ ] }: nixpkgs-u.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules =
|
||||
[{ nixpkgs = nixpkgsSettings { inherit system; }; }] ++
|
||||
commonBaseModules ++ thorBaseModules ++
|
||||
(homeManagerUModules { bertof = import ./thor/hm.nix; }) ++
|
||||
extraModules;
|
||||
};
|
||||
thorBuilder = { extraModules ? [ ] }:
|
||||
nixpkgs-u.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
|
||||
++ commonBaseModules ++ thorBaseModules
|
||||
++ (homeManagerUModules { bertof = import ./thor/hm.nix; })
|
||||
++ extraModules;
|
||||
};
|
||||
|
||||
lokiBaseModules = [
|
||||
./loki/hardware-configuration.nix
|
||||
|
|
@ -117,39 +161,38 @@
|
|||
nixos-hardware.nixosModules.common-pc-ssd
|
||||
./loki/configuration.nix
|
||||
];
|
||||
lokiBuilder = { extraModules ? [ ] }: nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules =
|
||||
[{ nixpkgs = nixpkgsSettings { inherit system; }; }] ++
|
||||
commonBaseModules ++ lokiBaseModules ++
|
||||
(homeManagerModules { bertof = import ./loki/hm.nix; }) ++
|
||||
extraModules;
|
||||
};
|
||||
lokiBuilder = { extraModules ? [ ] }:
|
||||
nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
|
||||
++ commonBaseModules ++ lokiBaseModules
|
||||
++ (homeManagerModules { 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 =
|
||||
[{ nixpkgs = nixpkgsSettings { inherit system; }; }] ++
|
||||
commonBaseModules ++ freyaBaseModules ++
|
||||
(homeManagerModules { bertof = import ./freya/hm.nix; }) ++
|
||||
extraModules;
|
||||
};
|
||||
freyaBuilder = { extraModules ? [ ] }:
|
||||
nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
|
||||
++ commonBaseModules ++ freyaBaseModules
|
||||
++ (homeManagerModules { bertof = import ./freya/hm.nix; })
|
||||
++ extraModules;
|
||||
};
|
||||
|
||||
baldurBaseModules = [
|
||||
./baldur/configuration.nix
|
||||
];
|
||||
balurBuilder = { extraModules ? [ ] }: nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }] ++
|
||||
commonBaseModules ++ baldurBaseModules ++
|
||||
(homeManagerModules { bertof = import ./baldur/hm.nix; }) ++
|
||||
extraModules;
|
||||
};
|
||||
baldurBaseModules = [ ./baldur/configuration.nix ];
|
||||
balurBuilder = { extraModules ? [ ] }:
|
||||
nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
|
||||
++ commonBaseModules ++ baldurBaseModules
|
||||
++ (homeManagerModules { bertof = import ./baldur/hm.nix; })
|
||||
++ extraModules;
|
||||
};
|
||||
in
|
||||
(flake-utils.lib.eachDefaultSystem (system: rec {
|
||||
packages = pkgs-u { inherit system; };
|
||||
|
|
@ -157,7 +200,10 @@
|
|||
checks = {
|
||||
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = { nixpkgs-fmt.enable = true; nix-linter.enable = true; };
|
||||
hooks = {
|
||||
nixpkgs-fmt.enable = true;
|
||||
nix-linter.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue