This commit is contained in:
Casper V. Kristensen 2023-08-13 19:28:37 +02:00
parent b185275a0f
commit bd6b30dbe7
10 changed files with 106 additions and 18 deletions

View file

@ -21,6 +21,27 @@
"type": "github"
}
},
"home-manager-unstable": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1691882297,
"narHash": "sha256-e1/LAQSGLnBywfA1TfMl0Vj3tvYka73XOZ/D2/CJowE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c3ab5ea047e6dc73df530948f7367455749d8906",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "home-manager",
"type": "github"
}
},
"impermanence": {
"locked": {
"lastModified": 1690797372,
@ -43,11 +64,11 @@
]
},
"locked": {
"lastModified": 1691292840,
"narHash": "sha256-NA+o/NoOOQhzAQwB2JpeKoG+iYQ6yn/XXVxaGd5HSQI=",
"lastModified": 1691897365,
"narHash": "sha256-jvWIU4ht3YAmF8TDVM2Ps2+Gf4MtNGLL1zEWQZdTrzU=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "6c626d54d0414d34c771c0f6f9d771bc8aaaa3c4",
"rev": "f4d70d098f066a30c7087144063dca179495f7d6",
"type": "github"
},
"original": {
@ -58,11 +79,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1691592289,
"narHash": "sha256-Lqpw7lrXlLkYra33tp57ms8tZ0StWhbcl80vk4D90F8=",
"lastModified": 1691831739,
"narHash": "sha256-6e12VCvA7jOjhzJ1adLiUV1GTPXGBcCfhggsDwiuNB4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9034b46dc4c7596a87ab837bb8a07ef2d887e8c7",
"rev": "3fe694c4156b84dac12627685c7ae592a71e2206",
"type": "github"
},
"original": {
@ -72,12 +93,30 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1691654369,
"narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"home-manager-unstable": "home-manager-unstable",
"impermanence": "impermanence",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
}
},

View file

@ -5,6 +5,9 @@
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-23.05";
};
nixpkgs-unstable = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
impermanence = {
url = "github:nix-community/impermanence";
};
@ -16,6 +19,10 @@
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs"; # use the same nixpkgs as the system
};
home-manager-unstable = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs"; # use the same nixpkgs as the system
};
};
outputs = { self, nixpkgs, ... }@inputs: {
@ -27,25 +34,19 @@
omega = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs; # pass flake inputs to modules
modules = [
./hosts/omega
];
modules = [ ./hosts/omega ];
};
# Laptop
zeta = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs; # pass flake inputs to modules
modules = [
./hosts/zeta
];
modules = [ ./hosts/zeta ];
};
# Tor relay
tor = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs; # pass flake inputs to modules
modules = [
./hosts/tor
];
modules = [ ./hosts/tor ];
};
};
};

View file

@ -1,6 +1,7 @@
{ ... }: {
imports = [
./hardware.nix
../../overlays
../../modules/base
../../modules/desktop
];

View file

@ -36,12 +36,12 @@
fileSystems."/mnt/C" = {
device = "/dev/disk/by-label/C";
fsType = "ntfs-3g";
options = [ "rw" "uid=1000"];
options = [ "rw" "uid=1000" ];
};
fileSystems."/mnt/Backup" = {
device = "/dev/disk/by-label/Backup";
fsType = "ntfs-3g";
options = [ "rw" "uid=1000"];
options = [ "rw" "uid=1000" ];
};
# Enables DHCP on all ethernet and wireless LAN interfaces.

View file

@ -2,6 +2,7 @@
imports = [
./hardware.nix
./tor.nix
../../overlays
../../modules/base
../../modules/tor
];

View file

@ -1,6 +1,7 @@
{ ... }: {
imports = [
./hardware.nix
../../overlays
../../modules/base
../../modules/desktop
];

View file

@ -1,6 +1,7 @@
{ pkgs, ... }: {
imports = [
./firefox.nix
./kanshi.nix
./network.nix
./ssh.nix
./sway.nix

View file

@ -0,0 +1,25 @@
{ home-manager, lib, pkgs, ... }: {
# https://nix-community.github.io/home-manager/options.html
home-manager.users.caspervk = {
services.kanshi = {
enable = true;
profiles = {
# Output names ("criteria") from `swaymsg -t get_outputs`.
home.outputs = [
{
criteria = "ASUSTek COMPUTER INC ROG XG27AQ M3LMQS370969";
mode = "2560x1440@144Hz";
position = "0,0";
adaptiveSync = true;
}
{
criteria = "BNQ BenQ XL2411Z SCD06385SL0";
mode = "1920x1080@144Hz";
position = "2560,0";
}
];
};
};
};
}

5
overlays/default.nix Normal file
View file

@ -0,0 +1,5 @@
{ ... }: {
imports = [
./kanshi.nix
];
}

14
overlays/kanshi.nix Normal file
View file

@ -0,0 +1,14 @@
{ home-manager, home-manager-unstable, nixpkgs-unstable, ... }: {
# adaptiveSync requires the unstable kanshi nixpkgs and home-manager module
nixpkgs.overlays = [
(self: super: {
kanshi = nixpkgs-unstable.legacyPackages.${super.system}.kanshi;
})
];
home-manager.users.caspervk = {
disabledModules = [ "${home-manager}/modules/services/kanshi.nix" ];
imports = [ "${home-manager-unstable}/modules/services/kanshi.nix" ];
};
}