Merge branch 'deploy'
This commit is contained in:
commit
e3abbc2e88
16 changed files with 458 additions and 289 deletions
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs ? import <nixos> { inherit system; }, system ? builtins.currentSystem }:
|
||||
|
||||
let
|
||||
self = with pkgs; {
|
||||
clipedit = callPackage ./clipedit { };
|
||||
|
|
@ -10,4 +9,4 @@ let
|
|||
vital-synth = callPackage ./vital-synth { };
|
||||
};
|
||||
in
|
||||
(self)
|
||||
self
|
||||
|
|
|
|||
86
flake.lock
generated
86
flake.lock
generated
|
|
@ -1,6 +1,42 @@
|
|||
{
|
||||
"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": 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,
|
||||
"locked": {
|
||||
"lastModified": 1668681692,
|
||||
|
|
@ -79,7 +115,7 @@
|
|||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs-u"
|
||||
"nixpkgs"
|
||||
],
|
||||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
},
|
||||
|
|
@ -114,16 +150,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1670355658,
|
||||
"narHash": "sha256-5q+lrQ11d1gJHYiYfaxvrlLu8sQw3TYbZJR9mKvOaI8=",
|
||||
"lastModified": 1648219316,
|
||||
"narHash": "sha256-Ctij+dOi0ZZIfX5eMhgwugfvB+WZSrvVNAyAuANOsnQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b9279279bd5abe3cbd08fee1275de3036487d489",
|
||||
"rev": "30d3d79b7d3607d56546dd2a6b49e156ba0ec634",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-22.11",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
@ -160,6 +196,22 @@
|
|||
"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": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
|
|
@ -187,13 +239,13 @@
|
|||
},
|
||||
"pre-commit-hooks_2": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixpkgs-u"
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
|
|
@ -213,11 +265,12 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"deploy-rs": "deploy-rs",
|
||||
"flake-utils": "flake-utils",
|
||||
"home-manager": "home-manager",
|
||||
"nix-rice": "nix-rice",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-u": "nixpkgs-u",
|
||||
"pre-commit-hooks": "pre-commit-hooks_2",
|
||||
"tex2nix": "tex2nix"
|
||||
|
|
@ -229,7 +282,7 @@
|
|||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs-u"
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
|
|
@ -245,6 +298,21 @@
|
|||
"repo": "tex2nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1648297722,
|
||||
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
|||
381
flake.nix
381
flake.nix
|
|
@ -4,7 +4,6 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
|
||||
nixpkgs-u.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-22.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -13,39 +12,45 @@
|
|||
# url = "github:nix-community/home-manager";
|
||||
# inputs.nixpkgs.follows = "nixpkgs-u";
|
||||
# };
|
||||
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
# nixos-generators.url = "github:nix-community/nixos-generators";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
|
||||
nix-rice = {
|
||||
url = "github:bertof/nix-rice";
|
||||
inputs = { nixpkgs.follows = "nixpkgs-u"; flake-utils.follows = "flake-utils"; };
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
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"; };
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
tex2nix = {
|
||||
url = "github:Mic92/tex2nix";
|
||||
inputs = { nixpkgs.follows = "nixpkgs-u"; flake-utils.follows = "flake-utils"; };
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, home-manager
|
||||
, nixpkgs-u
|
||||
# , home-manager-u
|
||||
, home-manager
|
||||
, deploy-rs
|
||||
, flake-utils
|
||||
, nixos-hardware
|
||||
, tex2nix
|
||||
, # , nixos-generators
|
||||
nixos-hardware
|
||||
, nix-rice
|
||||
, pre-commit-hooks
|
||||
, tex2nix
|
||||
,
|
||||
}:
|
||||
let
|
||||
|
||||
defaultConfig = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
permittedInsecurePackages = [
|
||||
|
|
@ -54,186 +59,232 @@
|
|||
];
|
||||
};
|
||||
|
||||
overlaysBuilder = { system }: [
|
||||
# Packages
|
||||
(_: _: { stable = pkgs { inherit system; }; unstable = pkgs-u { inherit system; }; })
|
||||
overlays = [
|
||||
# Combine stable and unstable packages
|
||||
(_: _: {
|
||||
stable = import nixpkgs { inherit config overlays; };
|
||||
unstable = import nixpkgs-u { inherit config overlays; };
|
||||
})
|
||||
|
||||
# Nix rice
|
||||
(nix-rice.overlays.default)
|
||||
nix-rice.overlays.default
|
||||
(import ./rice.nix)
|
||||
|
||||
# Flakes packages
|
||||
(final: _: {
|
||||
inherit (tex2nix.packages.${system}) tex2nix;
|
||||
clipedit = final.callPackage ./custom/clipedit { };
|
||||
|
||||
update-background = final.callPackage ./custom/update-background {
|
||||
(self: _: {
|
||||
clipedit = self.callPackage ./custom/clipedit { };
|
||||
update-background = self.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;
|
||||
lockscreen = self.callPackage ./custom/lockscreen {
|
||||
palette = self.rice.colorPalette;
|
||||
font = self.rice.font.normal;
|
||||
};
|
||||
sddm-theme-clairvoyance = final.callPackage ./custom/sddm-theme-clairvoyance {
|
||||
sddm-theme-clairvoyance = self.callPackage ./custom/sddm-theme-clairvoyance {
|
||||
wallpaper = ./wallpapers/comfy_waves.jpg;
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
modulesBuilder = { system, config ? defaultConfig }:
|
||||
let overlays = overlaysBuilder { inherit system; }; in
|
||||
[
|
||||
# Nix configuration
|
||||
({ pkgs, ... }: {
|
||||
nixpkgs = { inherit system overlays config; };
|
||||
nix = {
|
||||
package = pkgs.nixVersions.stable;
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
basic = with flake-utils.lib; eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs-u { inherit system config overlays; };
|
||||
in
|
||||
{
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
|
||||
checks = {
|
||||
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
deadnix.enable = true;
|
||||
nixpkgs-fmt.enable = true;
|
||||
nix-linter.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
};
|
||||
})
|
||||
};
|
||||
|
||||
# Home manager configuration
|
||||
home-manager.nixosModules.home-manager
|
||||
({ home-manager = { useGlobalPkgs = true; useUserPackages = true; }; })
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
deploy-rs.packages.${system}.deploy-rs
|
||||
];
|
||||
shellHook = ''
|
||||
${self.checks.${system}.pre-commit-check.shellHook}
|
||||
'';
|
||||
};
|
||||
});
|
||||
|
||||
# Common modules
|
||||
./nixos_modules/bertof_user.nix
|
||||
./nixos_modules/automatic-garbage-collection.nix
|
||||
./nixos_modules/automatic-upgrade.nix
|
||||
./nixos_modules/zerotier.nix
|
||||
];
|
||||
commonModules = [
|
||||
# Nix configuration
|
||||
({ pkgs, ... }: {
|
||||
nixpkgs = { inherit overlays config; };
|
||||
nix = {
|
||||
package = pkgs.nixVersions.stable;
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
registry = {
|
||||
stable = {
|
||||
from = {
|
||||
id = "stable";
|
||||
type = "indirect";
|
||||
};
|
||||
flake = nixpkgs;
|
||||
};
|
||||
unstable = {
|
||||
from = {
|
||||
id = "unstable";
|
||||
type = "indirect";
|
||||
};
|
||||
flake = nixpkgs-u;
|
||||
};
|
||||
tex2nix = {
|
||||
from = {
|
||||
id = "tex2nix";
|
||||
type = "indirect";
|
||||
};
|
||||
flake = tex2nix;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
pkgs = { system, config ? defaultConfig }:
|
||||
let overlays = overlaysBuilder { inherit system; }; in
|
||||
import nixpkgs { inherit system config overlays; };
|
||||
pkgs-u = { system, config ? defaultConfig }:
|
||||
let overlays = overlaysBuilder { inherit system; }; in
|
||||
import nixpkgs-u { inherit system config overlays; };
|
||||
# Home manager configuration
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
};
|
||||
}
|
||||
|
||||
odinBaseModules = [
|
||||
./odin/hardware-configuration.nix
|
||||
nixos-hardware.nixosModules.common-cpu-intel
|
||||
nixos-hardware.nixosModules.common-pc-laptop
|
||||
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||
./odin/common_configuration.nix
|
||||
|
||||
./nixos_modules/pro_audio.nix
|
||||
./nixos_modules/sesar.nix
|
||||
./nixos_modules/bertof_user.nix
|
||||
./nixos_modules/automatic-garbage-collection.nix
|
||||
./nixos_modules/automatic-upgrade.nix
|
||||
./nixos_modules/zerotier.nix
|
||||
];
|
||||
odinIntelModules = [ ./odin/configuration-intel.nix ];
|
||||
odinNvidiaModules = [ ./odin/configuration-nvidia.nix ];
|
||||
|
||||
odinIntelBuilder = { extraModules ? [ ] }:
|
||||
nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = (modulesBuilder { inherit system; })
|
||||
++ odinBaseModules ++ odinIntelModules
|
||||
++ [{ home-manager.users.bertof = import ./odin/hm.nix; }]
|
||||
++ extraModules;
|
||||
};
|
||||
odinNvidiaBuilder = { extraModules ? [ ] }:
|
||||
nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = (modulesBuilder { inherit system; config = defaultConfig // { cudaSupport = true; }; })
|
||||
++ odinBaseModules ++ odinNvidiaModules
|
||||
++ [{ home-manager.users.bertof = import ./odin/hm.nix; }]
|
||||
++ extraModules;
|
||||
};
|
||||
thorConfig = {
|
||||
nixosConfigurations = {
|
||||
thor = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules =
|
||||
commonModules
|
||||
++ [
|
||||
{ nixpkgs.config = config // { cudaSupport = true; }; }
|
||||
./thor/hardware-configuration.nix
|
||||
nixos-hardware.nixosModules.common-cpu-amd
|
||||
nixos-hardware.nixosModules.common-pc-ssd
|
||||
./thor/configuration.nix
|
||||
|
||||
thorBaseModules = [
|
||||
./thor/hardware-configuration.nix
|
||||
nixos-hardware.nixosModules.common-cpu-amd
|
||||
nixos-hardware.nixosModules.common-pc-ssd
|
||||
./thor/configuration.nix
|
||||
./nixos_modules/pro_audio.nix
|
||||
./nixos_modules/sesar.nix
|
||||
./nixos_modules/pentablet.nix
|
||||
|
||||
./nixos_modules/pro_audio.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;
|
||||
{ home-manager.users.bertof = import ./thor/hm.nix; }
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
devShells.default = packages.mkShell {
|
||||
shellHook = ''
|
||||
${self.checks.${system}.pre-commit-check.shellHook}
|
||||
'';
|
||||
odinConfig = {
|
||||
nixosConfigurations =
|
||||
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 { };
|
||||
|
||||
odin = odin-intel;
|
||||
odin-intel = odinIntelBuilder { };
|
||||
odin-nvidia = odinNvidiaBuilder { };
|
||||
|
||||
loki = lokiBuilder { };
|
||||
# loki-stable = lokiStable [ ./nixos_modules/dnsmasq.nix ];
|
||||
# loki-k3s = lokiStable [ ./nixos_modules/k3s.nix ];
|
||||
# loki-unstable = lokiUnstable [ ];
|
||||
|
||||
freya = freyaBuilder { };
|
||||
baldur = balurBuilder { };
|
||||
freyaConfig = {
|
||||
nixosConfigurations = rec {
|
||||
freya = nixpkgs.lib.nixosSystem rec {
|
||||
system = "aarch64-linux";
|
||||
modules =
|
||||
commonModules
|
||||
++ [
|
||||
nixos-hardware.nixosModules.raspberry-pi."4"
|
||||
./freya/hardware-configuration.nix
|
||||
./freya/configuration.nix
|
||||
{ home-manager.users.bertof = import ./freya/hm.nix; }
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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 = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.helix;
|
||||
# package = pkgs.helix;
|
||||
languages = [ ];
|
||||
settings = {
|
||||
theme = "ayu_mirage";
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
let
|
||||
strPalette = with pkgs.rice;
|
||||
pkgs.lib.rice.palette.toRgbHex rec {
|
||||
foreground = colorPalette.primary.foreground;
|
||||
background = colorPalette.primary.background;
|
||||
inherit (colorPalette.primary) background foreground;
|
||||
color0 = colorPalette.normal.black;
|
||||
color1 = colorPalette.normal.red;
|
||||
color2 = colorPalette.normal.green;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
bibtool
|
||||
tex2nix
|
||||
# tex2nix
|
||||
texlab
|
||||
texlive.combined.scheme-medium
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs.unstable; [
|
||||
home.packages = with pkgs; [
|
||||
libreoffice-fresh
|
||||
# onlyoffice-bin
|
||||
hunspellDicts.en_GB-large
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ let
|
|||
lib.concatStringsSep " "
|
||||
[
|
||||
"${pkgs.yad}/bin/yad --question --center --on-top --sticky --timeout=30 --timeout-indicator=bottom"
|
||||
(if isNull title then "" else ''--title "${title}"'')
|
||||
(if isNull image then "" else ''--image "${image}"'')
|
||||
(if isNull text then "" else ''--text "${text}"'')
|
||||
(if title == null then "" else ''--title "${title}"'')
|
||||
(if image == null then "" else ''--image "${image}"'')
|
||||
(if text == null then "" else ''--text "${text}"'')
|
||||
"&& ${cmd}"
|
||||
];
|
||||
systemctl = "${pkgs.systemd}/bin/systemctl";
|
||||
|
|
@ -34,13 +34,13 @@ let
|
|||
|
||||
normal = {
|
||||
foreground = colorPalette.normal.white;
|
||||
background = color.setAlphaRgba alpha (colorPalette.normal.black);
|
||||
background = color.setAlphaRgba alpha colorPalette.normal.black;
|
||||
underline = colorPalette.dark.blue;
|
||||
};
|
||||
|
||||
active = {
|
||||
foreground = colorPalette.bright.white;
|
||||
background = color.setAlphaRgba alpha (colorPalette.normal.black);
|
||||
background = color.setAlphaRgba alpha colorPalette.normal.black;
|
||||
underline = colorPalette.normal.yellow;
|
||||
};
|
||||
|
||||
|
|
@ -50,14 +50,10 @@ let
|
|||
underline = colorPalette.bright.red;
|
||||
};
|
||||
|
||||
alert = colorPalette.bright.red;
|
||||
|
||||
green = colorPalette.normal.green;
|
||||
yellow = colorPalette.normal.yellow;
|
||||
inherit (colorPalette.normal) green red yellow;
|
||||
inherit (color) transparent;
|
||||
orange = colorPalette.bright.red;
|
||||
red = colorPalette.normal.red;
|
||||
|
||||
transparent = color.transparent;
|
||||
alert = orange;
|
||||
};
|
||||
|
||||
commonBar = {
|
||||
|
|
@ -67,8 +63,9 @@ let
|
|||
height = 20;
|
||||
radius = 6.0;
|
||||
fixed-center = false;
|
||||
background = colors.normal.background;
|
||||
foreground = colors.normal.foreground;
|
||||
|
||||
inherit (colors.normal) background foreground;
|
||||
|
||||
line-size = 2;
|
||||
line-color = colors.normal.underline;
|
||||
padding = 0;
|
||||
|
|
@ -306,38 +303,38 @@ in
|
|||
};
|
||||
menu = [
|
||||
[
|
||||
({
|
||||
{
|
||||
text = "";
|
||||
exec = confirm_command {
|
||||
cmd = logout;
|
||||
title = "Logout";
|
||||
text = "Do you want to logout?";
|
||||
};
|
||||
})
|
||||
({
|
||||
}
|
||||
{
|
||||
text = "";
|
||||
exec = confirm_command {
|
||||
cmd = "${systemctl} reboot";
|
||||
title = "Reboot";
|
||||
text = "Do you want to reboot?";
|
||||
};
|
||||
})
|
||||
({
|
||||
}
|
||||
{
|
||||
text = "";
|
||||
exec = confirm_command {
|
||||
cmd = "${systemctl} hibernate";
|
||||
title = "Hibernate";
|
||||
text = "Do you want to hibernate?";
|
||||
};
|
||||
})
|
||||
({
|
||||
}
|
||||
{
|
||||
text = "";
|
||||
exec = confirm_command {
|
||||
cmd = "${shutdown} now";
|
||||
title = "Shutdown";
|
||||
text = "Do you want to shutdown?";
|
||||
};
|
||||
})
|
||||
}
|
||||
]
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ ... }: {
|
||||
|
||||
{
|
||||
networking.hosts = {
|
||||
"54.176.11.243" = [ "vpn.mhackeroni.it" ];
|
||||
"10.100.0.50" = [
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{ ... }:
|
||||
let
|
||||
blocklist = builtins.fetchurl {
|
||||
sha256 = "sha256:16xcx2z8ziv2fbqhr4ajayxblcs4i1ckrwnf50iina9asgia18za";
|
||||
|
|
|
|||
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 = [
|
||||
# ];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -33,15 +33,6 @@ with lib; {
|
|||
networkmanager.enable = true;
|
||||
# networkmanager.wifi.backend = "iwd";
|
||||
|
||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||
# replicates the default behaviour.
|
||||
useDHCP = false;
|
||||
interfaces = {
|
||||
enp60s0.useDHCP = true;
|
||||
wlp0s20f3.useDHCP = true;
|
||||
};
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# proxy.default = "http://user:password@proxy:port/";
|
||||
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
|
|
|||
|
|
@ -4,84 +4,105 @@
|
|||
{ config, lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@root" "x-gvfs-hide" ];
|
||||
};
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@root" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@nix" "x-gvfs-hide" ];
|
||||
};
|
||||
fileSystems."/nix" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@nix" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/82DB-3444";
|
||||
fsType = "vfat";
|
||||
options = [ "x-gvfs-hide" ];
|
||||
};
|
||||
fileSystems."/home/bertof" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@home" ];
|
||||
};
|
||||
|
||||
fileSystems."/home/bertof" = {
|
||||
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@home" "x-gvfs-hide" ];
|
||||
};
|
||||
fileSystems."/home/bertof/Giochi/SSD" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@games" ];
|
||||
};
|
||||
|
||||
fileSystems."/home/bertof/Documenti/Git" = {
|
||||
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@git" "x-gvfs-hide" ];
|
||||
};
|
||||
fileSystems."/home/bertof/Video" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@videos" ];
|
||||
};
|
||||
|
||||
fileSystems."/home/bertof/Immagini" = {
|
||||
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@images" "x-gvfs-hide" ];
|
||||
};
|
||||
fileSystems."/home/bertof/Giochi/SATA" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@games" ];
|
||||
};
|
||||
|
||||
fileSystems."/home/bertof/Video" = {
|
||||
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@videos" "x-gvfs-hide" ];
|
||||
};
|
||||
fileSystems."/home/bertof/Musica" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@music" ];
|
||||
};
|
||||
|
||||
fileSystems."/home/bertof/Documenti" = {
|
||||
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@documents" "x-gvfs-hide" ];
|
||||
};
|
||||
fileSystems."/home/bertof/Immagini" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@images" ];
|
||||
};
|
||||
|
||||
fileSystems."/home/bertof/Musica" = {
|
||||
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@music" "x-gvfs-hide" ];
|
||||
};
|
||||
fileSystems."/home/bertof/Scaricati" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@downloads" ];
|
||||
};
|
||||
|
||||
fileSystems."/home/bertof/Scaricati" = {
|
||||
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@downloads" "x-gvfs-hide" ];
|
||||
};
|
||||
fileSystems."/home/bertof/Documenti" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@documents" ];
|
||||
};
|
||||
|
||||
fileSystems."/home/bertof/Giochi/SSD" = {
|
||||
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@games" "x-gvfs-hide" ];
|
||||
};
|
||||
fileSystems."/home/bertof/Documenti/Git" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@git" ];
|
||||
};
|
||||
|
||||
fileSystems."/home/bertof/Giochi/SATA" = {
|
||||
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@bertof/@games" "x-gvfs-hide" ];
|
||||
};
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/82DB-3444";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/docker/btrfs" =
|
||||
{
|
||||
device = "/home/bertof/Documenti/Git/@root/var/lib/docker/btrfs";
|
||||
fsType = "none";
|
||||
options = [ "bind" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/5f3cf424-2bd8-4352-a778-1bb067cb5700"; }];
|
||||
|
|
@ -92,11 +113,13 @@
|
|||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
# networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp60s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
networking.interfaces.enp10s0u1u2.useDHCP = lib.mkDefault true;
|
||||
networking.interfaces.enp60s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.virbr0.useDHCP = lib.mkDefault true;
|
||||
networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.ztmjfdwjkp.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
teams
|
||||
thunderbird
|
||||
transmission-gtk
|
||||
unstable.firefox
|
||||
firefox
|
||||
virt-manager
|
||||
virt-viewer
|
||||
# wineFull
|
||||
|
|
|
|||
14
rice.nix
14
rice.nix
|
|
@ -1,4 +1,4 @@
|
|||
final: prev:
|
||||
self: super:
|
||||
let
|
||||
# nord = prev.lib.rice.palette.tPalette prev.lib.rice.color.hexToRgba (import ./themes/nord.nix);
|
||||
# onedark = prev.lib.rice.palette.tPalette prev.lib.rice.color.hexToRgba (import ./themes/onedark.nix);
|
||||
|
|
@ -6,12 +6,12 @@ let
|
|||
# mkpm = with prev.lib.rice; palette.tPalette color.hexToRgba (import ./themes/monokai-pro-machine.nix);
|
||||
# bloom = with prev.lib.rice;
|
||||
# palette.tPalette color.hexToRgba (import ./themes/bloom.nix);
|
||||
ayu-mirage = with prev.lib.rice;
|
||||
ayu-mirage = with super.lib.rice;
|
||||
palette.tPalette color.hexToRgba (import ./themes/ayu-mirage.nix);
|
||||
in
|
||||
(rec {
|
||||
rec {
|
||||
rice = {
|
||||
colorPalette = with prev.lib.rice; rec {
|
||||
colorPalette = with super.lib.rice; rec {
|
||||
normal = palette.defaultPalette // {
|
||||
inherit (ayu-mirage.normal) black red green yellow blue magenta cyan white;
|
||||
};
|
||||
|
|
@ -29,15 +29,15 @@ in
|
|||
font = {
|
||||
normal = {
|
||||
name = "Cantarell";
|
||||
package = final.cantarell-fonts;
|
||||
package = self.cantarell-fonts;
|
||||
size = 10;
|
||||
};
|
||||
monospace = {
|
||||
name = "FiraCode Nerd Font Mono";
|
||||
package = (final.nerdfonts.override { fonts = [ "FiraCode" ]; });
|
||||
package = self.nerdfonts.override { fonts = [ "FiraCode" ]; };
|
||||
size = 10;
|
||||
};
|
||||
};
|
||||
opacity = 0.95;
|
||||
};
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
teams
|
||||
thunderbird
|
||||
transmission-gtk
|
||||
unstable.firefox
|
||||
firefox
|
||||
virt-manager
|
||||
virt-viewer
|
||||
# wineFull
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue