feat: switched to flake based config
This commit is contained in:
parent
840740c18f
commit
069dc455a9
|
@ -70,6 +70,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
services.autorandr.enable = true;
|
||||||
|
|
||||||
#TODO sollte nur bestimmte packages sein nicht alle
|
#TODO sollte nur bestimmte packages sein nicht alle
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
@ -167,7 +168,7 @@
|
||||||
# Copy the NixOS configuration file and link it from the resulting system
|
# Copy the NixOS configuration file and link it from the resulting system
|
||||||
# (/run/current-system/configuration.nix). This is useful in case you
|
# (/run/current-system/configuration.nix). This is useful in case you
|
||||||
# accidentally delete configuration.nix.
|
# accidentally delete configuration.nix.
|
||||||
system.copySystemConfiguration = true;
|
# system.copySystemConfiguration = true;
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
|
|
64
flake.lock
Normal file
64
flake.lock
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"utils": "utils"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1674556204,
|
||||||
|
"narHash": "sha256-HCRmkZsq01h2Evch08zpgE9jeHdMtGdT1okWotyvuhY=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "c59f0eac51da91c6989fd13a68e156f63c0e60b6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1674459583,
|
||||||
|
"narHash": "sha256-L0UZl/u2H3HGsrhN+by42c5kNYeKtdmJiPzIRvEVeiM=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1b1f50645af2a70dc93eae18bfd88d330bfbcf7f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1667395993,
|
||||||
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
27
flake.nix
Normal file
27
flake.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
inputs.home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
# should use system nixpkgs instead of their own
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, home-manager, ... }: let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
in {nixosConfigurations.patricknix =
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -73,7 +73,7 @@
|
||||||
};
|
};
|
||||||
DP-1 = {
|
DP-1 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
mode = "1920x1080";
|
mode = "2560x1440";
|
||||||
position = "0x0";
|
position = "0x0";
|
||||||
rate = "144";
|
rate = "144";
|
||||||
gamma = "1";
|
gamma = "1";
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
home-manager,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
|
{
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
(import "${home-manager}/nixos")
|
|
||||||
];
|
|
||||||
home-manager.users.patrick.imports = [./patrick.nix];
|
home-manager.users.patrick.imports = [./patrick.nix];
|
||||||
home-manager.users.root = {
|
home-manager.users.root = {
|
||||||
imports = [./common];
|
imports = [./common];
|
||||||
|
|
Loading…
Reference in a new issue