Compare commits

..

4 commits

6 changed files with 119 additions and 46 deletions

View file

@ -61,7 +61,7 @@ def _vm(args):
@aliases.register
def _upd(args: list):
path = Path("/etc/nixos")
possible_subcommands = ("switch", "boot")
possible_subcommands = ("switch", "boot", "test", "build-vm")
subcommand = "switch"
for arg in args:
if arg in possible_subcommands:

101
flake.lock generated
View file

@ -38,6 +38,26 @@
"type": "github"
}
},
"cosmic": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1738041275,
"narHash": "sha256-4Oqq357Q//Ra5qV9PdPLMkdH0uFFxy1stQF8hTe8xEM=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "36eabddc2d033f4fd31c53570db7e1e21591cba3",
"type": "github"
},
"original": {
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"type": "github"
}
},
"crane": {
"locked": {
"lastModified": 1733688869,
@ -92,15 +112,15 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"type": "github"
},
"original": {
"owner": "edolstra",
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
@ -108,11 +128,11 @@
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
@ -138,6 +158,22 @@
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_5": {
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
@ -286,7 +322,7 @@
"gauntlet": {
"inputs": {
"crane": "crane",
"flake-compat": "flake-compat",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
@ -451,7 +487,7 @@
"lanzaboote": {
"inputs": {
"crane": "crane_2",
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat_3",
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
@ -555,9 +591,9 @@
},
"nix-vscode-extensions": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1737683312,
@ -602,6 +638,22 @@
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1737885640,
"narHash": "sha256-GFzPxJzTd1rPIVD4IW+GwJlyGwBDV1Tj5FLYwDQQ9sM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4e96537f163fad24ed9eb317798a79afc85b51b7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1730741070,
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
@ -618,6 +670,22 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1737885589,
"narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1713805509,
"narHash": "sha256-YgSEan4CcrjivCNO5ZNzhg7/8ViLkZ4CB/GrGBVSudo=",
@ -633,7 +701,7 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1737632463,
"narHash": "sha256-38J9QfeGSej341ouwzqf77WIHAScihAKCt8PQJ+NH28=",
@ -652,7 +720,7 @@
"nixvim": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat_4",
"flake-compat": "flake-compat_5",
"flake-parts": "flake-parts_3",
"git-hooks": "git-hooks",
"home-manager": "home-manager_2",
@ -778,7 +846,7 @@
"lanzaboote",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1731363552,
@ -798,13 +866,14 @@
"inputs": {
"catppuccin-vsc": "catppuccin-vsc",
"compose2nix": "compose2nix",
"cosmic": "cosmic",
"gauntlet": "gauntlet",
"home-manager": "home-manager",
"lanzaboote": "lanzaboote",
"nix-flatpak": "nix-flatpak",
"nix-index-database": "nix-index-database",
"nix-vscode-extensions": "nix-vscode-extensions",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_4",
"nixvim": "nixvim",
"nur": "nur",
"plasma-manager": "plasma-manager",

View file

@ -4,6 +4,7 @@
stable.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
staging-next.url = "github:NixOS/nixpkgs/staging-next";
cosmic.url = "github:lilyinstarlight/nixos-cosmic";
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
@ -55,23 +56,10 @@
let
user = "cswimr";
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [
inputs.catppuccin-vsc.overlays.default
inputs.nur.overlays.default
inputs.gauntlet.overlays.default
];
config.allowUnfree = true;
};
stablePkgs = import inputs.stable {
inherit system;
config.allowUnfree = true;
};
stagingNextPkgs = import inputs.staging-next {
inherit system;
config.allowUnfree = true;
};
in
{
nixosConfigurations = {
@ -79,9 +67,7 @@
system = system;
specialArgs = {
inherit inputs;
inherit pkgs;
inherit stablePkgs;
inherit stagingNextPkgs;
system = system;
hostname = "eclipse";
user = user;
@ -96,7 +82,7 @@
./nixos/flatpak.nix
./nixos/gaming.nix
./nixos/gui-pkgs.nix
./nixos/nvidia.nix
#./nixos/nvidia.nix
./nixos/nvim.nix
./nixos/pkg.nix
./nixos/shell.nix
@ -111,8 +97,6 @@
hardware.bluetooth.enable = true;
}
# nixpkgs.nixosModules.readOnlyPkgs
# { nixpkgs.pkgs = pkgs; }
inputs.sops-nix.nixosModules.sops
inputs.nixvim.nixosModules.nixvim
inputs.nur.modules.nixos.default
@ -146,9 +130,7 @@
backupFileExtension = "bak";
extraSpecialArgs = {
inherit inputs;
inherit pkgs;
inherit stablePkgs;
inherit stagingNextPkgs;
system = system;
hostname = "eclipse";
user = user;
@ -176,7 +158,6 @@
system = system;
specialArgs = {
inherit inputs;
inherit pkgs;
system = system;
hostname = "nebula";
};
@ -214,7 +195,6 @@
backupFileExtension = "bak";
extraSpecialArgs = {
inherit inputs;
inherit pkgs;
system = system;
hostname = "nebula";
user = user;

View file

@ -1,7 +1,7 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ pkgs, config, ... }:
{
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@ -21,5 +21,14 @@
services.qemuGuest.enable = true;
# Add /etc/current-system-packages
environment.etc."current-system-packages".text =
let
packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
formatted = builtins.concatStringsSep "\n" sortedUnique;
in
formatted;
system.stateVersion = "24.11";
}

View file

@ -3,6 +3,7 @@
# and in the NixOS manual (accessible by running nixos-help).
{
pkgs,
inputs,
config,
hostname,
...
@ -18,9 +19,28 @@
"root"
"@wheel"
];
substituters = [
"https://devenv.cachix.org"
"https://cosmic.cachix.org"
];
trusted-public-keys = [
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
];
};
};
nixpkgs = {
config = {
allowUnfree = true;
};
overlays = [
inputs.catppuccin-vsc.overlays.default
inputs.nur.overlays.default
inputs.gauntlet.overlays.default
];
};
# install the most recent stable linux kernel
/*
TODO: change this back to 'pkgs.linuxPackages_latest' once

View file

@ -11,12 +11,7 @@
enable = true;
nix-direnv.enable = true;
direnvrcExtra = ''
''${DIRENV_DISABLE:+exit}
''${DIRENV_DISABLE:+exit}
'';
};
nix.extraOptions = ''
extra-substituters = https://devenv.cachix.org
extra-trusted-public-keys = devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=
'';
}